Skip to content

chore: add a test for offset against BlockEncryptionHandler #2115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025

Conversation

kessplas
Copy link
Contributor

Issue #, if available: #2112 (indirectly)

Description of changes: See above issue. This PR just adds a similar test to the BlockEncryptionHandler to ensure it doesn't have the same bug. It doesn't, but we'll include the test for robustness's sake.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@kessplas kessplas marked this pull request as ready for review May 29, 2025 18:07
@kessplas kessplas requested a review from a team as a code owner May 29, 2025 18:07
dataLength);
// decryptData (non-streaming) doesn't know about the offset
// it will strip out the original 0s
byte[] expectedOutput = new byte[10_000 - startOffset];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit for clarity, maybe

Suggested change
byte[] expectedOutput = new byte[10_000 - startOffset];
byte[] expectedOutputForNonStreamDecrypt = new byte[10_000 - startOffset];

@kessplas kessplas merged commit 08cf1a3 into master May 29, 2025
45 checks passed
@kessplas kessplas deleted the offset-block branch May 29, 2025 20:03
josecorella pushed a commit that referenced this pull request Jun 4, 2025
## [3.0.2](v3.0.1...v3.0.2) (2025-06-04)

### Fixes

* **AwsCrypto:** remove pre-mature Deprecation notices ([#2118](#2118)) ([4a19b04](4a19b04))
* do not truncate encrypted streams when offset is greater than zero ([#2113](#2113)) ([adb0a42](adb0a42))
* guard against null version and change property name to avoid conflicts ([#2116](#2116)) ([313caa7](313caa7))

### Maintenance

* add a test for offset against BlockEncryptionHandler ([#2115](#2115)) ([08cf1a3](08cf1a3))
* bump to latest mpl ([#2046](#2046)) ([6dd2d12](6dd2d12))
* **cfn:** Sonatype Migration to User Tokens; updated policies for CI project ([#2043](#2043)) ([7cfe049](7cfe049))
* **deps-dev:** bump commons-io:commons-io from 2.11.0 to 2.14.0 ([#2047](#2047)) ([1695a39](1695a39))
* **examples:** Shared cache across Hierarchical Keyrings ([#2045](#2045)) ([fd00cd0](fd00cd0))
* fix semantic release installation ([#2119](#2119)) ([0586279](0586279))
* **JavaDocs:** detail thread saftey of SDK Client Builders ([#2048](#2048)) ([86d5b62](86d5b62))
* move release to Nexus Central ([#2117](#2117)) ([9e91dad](9e91dad))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants